#ifndef TRAIN_H
#define TRAIN_H

#include "obj_wagon_locomotive.h"
#include "obj_wagon_flat.h"
#include "obj_orail.h"
#include "obj_obstacle.h"
#include <vector>
#include <deque>

#define CALC_DISTANCE 100

class ctrain {
	public:
		float x,y;
		
		ctrain(int lenght);
		vector<obj_wagon*> wagons;
		deque<obj_obstacle> obstacles;
		deque<rail> railroad;
		
		obj_orail orail[3];	//tie skutocne 3 kolajnice dolava rovno doprava
		void draw ();
		void update ();

		int addrail();
		char addrail_curtype;
		int addrail_same;

		void addobstacles();
		float obs_dst;
		
		void cleanold();
	};

#endif
